package com.fau.sd.timer;

import java.io.IOException;
import java.util.TimerTask;

import org.apache.log4j.Logger;

import com.fau.sd.ws.WebSocketServer;

/**
 * @desc 定时任务执行方法
 * @author liy
 * @datetime 2015年1月4日,下午10:40:40
 */
public class RemindTask extends TimerTask {
	
	private static final Logger log = Logger.getLogger(RemindTask.class);
	private String uid;
	private String content;
	
	public RemindTask() {
		
	}

	public RemindTask(String uid, String content) {
		this.uid = uid;
		this.content = content;
	}

	@Override
	public void run() {
		try {
			WebSocketServer.send(uid, content);
		} catch (IOException e) {
			log.error(e.getMessage());
		}
	}

	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	
}
